package qr.game;

import qr.core.Location;
import qr.game.rest.RestClient;
import android.app.ActionBar;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class LocationViewActivity extends Activity {
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate( savedInstanceState );
		setContentView( R.layout.single_location_view );
		TextView nameLabel = (TextView) findViewById(R.id.single_location_name);
		TextView description = (TextView) findViewById(R.id.single_location_description);
		String locationID = getIntent().getStringExtra("location");
		RestClient rc = RestClient.getRestClient();
		Location location = rc.getLocationInfo(locationID);
		nameLabel.setText(location.getName());
		description.setText(location.getInformation());
		ActionBar ab = this.getActionBar();
		ab.setDisplayHomeAsUpEnabled(true);
	}
	
}
